<html>
<head><meta charset="utf-8"><title>rebasing help after the move to `library/` · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rebasing.20help.20after.20the.20move.20to.20.60library.2F.60.html">rebasing help after the move to `library/`</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="205259473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rebasing%20help%20after%20the%20move%20to%20%60library/%60/near/205259473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rebasing.20help.20after.20the.20move.20to.20.60library.2F.60.html#205259473">(Jul 28 2020 at 16:36)</a>:</h4>
<p>Hi ! I want to rebase my branch (<a href="https://github.com/rust-lang/rust/pull/74200">https://github.com/rust-lang/rust/pull/74200</a>) by including the changes from the master branch (the move to <code>library/&lt;lib&gt;/src/...</code> done in <a href="https://github.com/rust-lang/rust/issues/73265">#73265</a>). I'm reading tutorials and the github book but I'm quite lost on how to do it without making my branches show a bazillion changes on thousands of files</p>



<a name="205259613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rebasing%20help%20after%20the%20move%20to%20%60library/%60/near/205259613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rebasing.20help.20after.20the.20move.20to.20.60library.2F.60.html#205259613">(Jul 28 2020 at 16:37)</a>:</h4>
<p>Would just using <code>git checkout master; git rebase my-branch; git checkout my-branch; git merge</code> work ?</p>



<a name="205259845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rebasing%20help%20after%20the%20move%20to%20%60library/%60/near/205259845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rebasing.20help.20after.20the.20move.20to.20.60library.2F.60.html#205259845">(Jul 28 2020 at 16:39)</a>:</h4>
<p>My rebase workflow is usually:</p>
<div class="codehilite"><pre><span></span><code>git fetch origin
git rebase origin/master
# could also do git checkout master; git pull; git checkout my-branch; git rebase master
git push -f
</code></pre></div>



<a name="205259932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rebasing%20help%20after%20the%20move%20to%20%60library/%60/near/205259932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rebasing.20help.20after.20the.20move.20to.20.60library.2F.60.html#205259932">(Jul 28 2020 at 16:40)</a>:</h4>
<p>I'm not sure how well it handles renames, but your PR is small enough that you can apply the changes from scratch if it goes south</p>



<a name="205260073"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rebasing%20help%20after%20the%20move%20to%20%60library/%60/near/205260073" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rebasing.20help.20after.20the.20move.20to.20.60library.2F.60.html#205260073">(Jul 28 2020 at 16:41)</a>:</h4>
<p>I'm making a copy before trying anything, then I'll try your suggestion <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span> thanks !</p>



<a name="205263435"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rebasing%20help%20after%20the%20move%20to%20%60library/%60/near/205263435" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rebasing.20help.20after.20the.20move.20to.20.60library.2F.60.html#205263435">(Jul 28 2020 at 17:08)</a>:</h4>
<p>yay it worked perfectly, thanks a lot!</p>



<a name="205279826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rebasing%20help%20after%20the%20move%20to%20%60library/%60/near/205279826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> DPC <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rebasing.20help.20after.20the.20move.20to.20.60library.2F.60.html#205279826">(Jul 28 2020 at 19:29)</a>:</h4>
<p>what I did yesterday was instead of going through the conflicts just pick a new branch from master and cherry pick commits on top. It's often less painful than rebasing especially if your PR is inactive for a few weeks</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>